package com.gao.security.verificationcode.entity;

import lombok.Data;

/**
 * <p></p>
 *
 * @author GaoShuangWen
 */
@Data
public class VerificationCode implements IVerificationCode {
    /**
     * 验证码
     */
    private String code;
    /**
     * 过期时间(单位：ms)
     */
    private Long expireTime;

    /**
     * 唯一键
     */
    private String codeToken;

    public VerificationCode(String code, String codeToken, int expireIn){
        this.code = code;
        this.expireTime = System.currentTimeMillis()+expireIn*1000;
        this.codeToken=codeToken;
    }
    public VerificationCode(String code, String uuid){
        this.code = code;
        this.codeToken=uuid;
    }



}
